<!DOCTYPE html>
<!--
    This test ensures the content overflow traversal correctness of Spatial Navigation
    algorithm: focusable elements in an scrollable containers (e.g. <div>) should be
    accessible, including offscreen content.

    * Pre-conditions:
    1) DRT support for SNav enable/disable.

    * Navigation steps:
    1) Loads this page, focus goes to "start" automatically.
    2) Move focus down to the visible focusable element in
       scrollable div.
    3) Traverse the page through other focusable elements down the page.
       and then back up.

    * Expected results: All focusable element in scrollable content, including
    offscreen ones, should be accessible via SNav. -->

<style type="text/css">
  .offscreen {
    position: absolute;
    left: -1000em;
  }
</style>

<div style="margin-left:120px">
  <a id="off" class="offscreen" href="a">offscreen content</a>
  <a id="start" href="a">Right link</a>
</div><br>
<a id="1" href="a">Down link</a><br>

<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="resources/snav-testharness.js"></script>
<script type="application/javascript">
  var resultMap = [
    ["Left", "1"]
  ];

  // starting the test itself: get to a known place.
  document.getElementById("start").focus();
  snav.assertFocusMoves(resultMap);
</script>
